#ifndef UFXCONFIG_H
#define UFXCONFIG_H
#include<QString>
#include<QMutex>
#include<QSettings>

class UFXConfig{
public:
    static UFXConfig* getInstance();

    QString GetString(const char *szSection, const char *szEntry, const char *szValue);
    void SetString(const char *szSection, const char *szEntry, const char *szValue);

private:
    UFXConfig();
    ~UFXConfig();
    //把复制构造函数和=操作符也设为私有,防止被复制
    UFXConfig(const UFXConfig&);
    UFXConfig& operator=(const UFXConfig&);

    static UFXConfig* instance;

    QSettings*        m_conf;
    QMutex            m_mutex;
};

#endif // UFXCONFIG_H
